import Vue from 'vue'
import App from './App.vue'
import router from './routers'
import store from './store'
import fastClick from 'fastclick'
import VueAwesomeSwiper from 'vue-awesome-swiper'
import VueLazyload from 'vue-lazyload' // 引入 vue-lazyload

import './common/stylus/index.styl'
import 'swiper/dist/css/swiper.css'

Vue.config.productionTip = false
fastClick.attach(document.body)
Vue.use(VueAwesomeSwiper)

// 使用 vue-lazyload
Vue.use(VueLazyload, {
  loading: require('common/image/default.png'), // 加载时显示的图片
  error: require('common/image/default.png') // 加载失败时显示的图片
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
